deprecated_gdk_sources = ['deprecated/gdkcolor.c']
gdk_sources = [
-# 'fallback-c89.c',
'gdk-private.c',
'gdk.c',
'gdkapplaunchcontext.c',
'gdkvisual.c',
'gdkwindow.c',
'gdkwindowimpl.c',
+ 'gdkseat.c',
+ 'gdkseatdefault.c',
+ 'gdkdevicetool.c',
+ 'gdkdrawingcontext.c',
+ 'gdkmonitor.c'
]
gdk_public_h_sources = [
'gdkpango.h',
'gdkframeclock.h',
'gdkpixbuf.h',
- 'gdkprivate.h',
'gdkproperty.h',
'gdkrectangle.h',
'gdkrgba.h',
'gdkthreads.h',
'gdktypes.h',
'gdkvisual.h',
- 'gdkwindow.h']
+ 'gdkwindow.h',
+ 'gdkseat.h',
+ 'gdkmonitor.h',
+ 'gdkdrawingcontext.h',
+ 'gdkdevicetool.h'
+]
+
+gdk_private_h_sources = [
+ 'gdkseatdefaultprivate.h',
+ 'gdkdevicetoolprivate.h',
+ 'gdkdrawingcontextprivate.h',
+ 'gdkmonitorprivate.h',
+ 'gdkprivate.h',
+]
-# HACK to get it running.
gdk_x_sources = [
'x11/MwmUtil.h',
'x11/gdkapplaunchcontext-x11.c',
'x11/gdkdevicemanager-core-x11.c',
'x11/gdkdevicemanager-x11.c',
'x11/gdkdevicemanager-xi2.c',
- 'x11/gdkdevicemanagerprivate-core.h',
'x11/gdkdisplaymanager-x11.c',
'x11/gdkdisplay-x11.c',
'x11/gdkdisplay-x11.h',
'x11/gdkxftdefaults.c',
'x11/gdkxid.c',
'x11/gdkx.h',
- 'x11/gdkprivate-x11.h',
'x11/xsettings-client.h',
'x11/xsettings-client.c',
+ 'x11/gdkmonitor-x11.c',
+ 'x11/gdkmonitor-x11.h',
+ 'x11/gdkx11monitor.h'
+]
+
+gdk_x_private_sources = [
+ 'x11/gdkprivate-x11.h',
+ 'x11/gdkdevicemanagerprivate-core.h',
+]
+
+gdk_wayland_sources = [
+ 'wayland/gdkapplaunchcontext-wayland.c',
+ 'wayland/gdkcursor-wayland.c',
+ 'wayland/gdkdevice-wayland.c',
+ 'wayland/gdkdisplay-wayland.c',
+ 'wayland/gdkdisplay-wayland.h',
+ 'wayland/gdkdnd-wayland.c',
+ 'wayland/gdkeventsource.c',
+ 'wayland/gdkglcontext-wayland.c',
+ 'wayland/gdkglcontext-wayland.h',
+ 'wayland/gdkkeys-wayland.c',
+ 'wayland/gdkmonitor-wayland.c',
+ 'wayland/gdkmonitor-wayland.h',
+ 'wayland/gdkscreen-wayland.c',
+ 'wayland/gdkseat-wayland.h',
+ 'wayland/gdkselection-wayland.c',
+ 'wayland/gdkwaylanddevice.h',
+ 'wayland/gdkwaylanddisplay.h',
+ 'wayland/gdkwaylandglcontext.h',
+ 'wayland/gdkwayland.h',
+ 'wayland/gdkwaylandmonitor.h',
+ 'wayland/gdkwaylandselection.h',
+ 'wayland/gdkwaylandwindow.h',
+ 'wayland/gdkwindow-wayland.c',
+ 'wayland/wm-button-layout-translation.c',
+ 'wayland/gtk-primary-selection-protocol.c',
+ 'wayland/gtk-shell-protocol.c',
+ 'wayland/xdg-shell-unstable-v5-protocol.c',
+ 'wayland/pointer-gestures-unstable-v1-protocol.c',
+ 'wayland/tablet-unstable-v2-protocol.c',
+]
+
+gdk_wayland_private_sources = [
+ 'wayland/gdkprivate-wayland.h',
+]
+
+
+
+gdk_broadway_sources = [
+ 'broadway/gdkdisplay-broadway.c',
+ 'broadway/gdkdisplay-broadway.h',
+ 'broadway/gdkscreen-broadway.c',
+ 'broadway/gdkscreen-broadway.h',
+ 'broadway/broadway-output.c',
+ 'broadway/broadway-output.h',
+ 'broadway/broadway-server.h',
+ 'broadway/broadway-server.c',
+ 'broadway/gdkbroadway-server.c',
+ 'broadway/gdkcursor-broadway.c',
+ 'broadway/gdkvisual-broadway.c',
+ 'broadway/gdkselection-broadway.c',
+ 'broadway/gdkwindow-broadway.c',
+ 'broadway/gdkwindow-broadway.h',
+ 'broadway/gdkmonitor-broadway.c',
+ 'broadway/gdkmonitor-broadway.h',
+ 'broadway/gdkkeys-broadway.c',
+ 'broadway/gdkglobals-broadway.c',
+ 'broadway/gdkeventsource.c',
+ 'broadway/gdkeventsource.h',
+ 'broadway/gdkdnd-broadway.c',
+ 'broadway/broadwayd.c',
+ 'broadway/gdkdevicemanager-broadway.c',
+ 'broadway/gdkdevicemanager-broadway.h',
+ 'broadway/gdkdevice-broadway.c',
+ 'broadway/gdkdevice-broadway.h',
+ 'broadway/broadway-buffer.c',
+ 'broadway/broadway-buffer.h',
+ 'broadway/gdktestutils-broadway.c',
+ 'broadway/gdkproperty-broadway.c'
+]
+
+gdk_broadway_private_sources = [
+ 'broadway/gdkprivate-broadway.h'
]
+
+
+gdkresources = gnome.compile_resources(
+ 'gdkresources',
+ 'gdk.gresource.xml',
+ source_dir: '.',
+ c_name: '_gdk',
+ extra_args: '--manual-register'
+)
+
+
deprecated_h_sources = ['deprecated/gdkcolor.h']
gdk_headers = gdk_public_h_sources + deprecated_h_sources
input : 'gdkmarshalers.list',
command : [mkmarshal, glib_marshal, '@INPUT@', '@OUTPUT@'])
-configure_file(input : 'gdkconfig.h.in',
+
+cdata = configuration_data()
+cdata.set('GDK_WINDOWING_X11', 1)
+cdata.set('GDK_WINDOWING_WAYLAND', 1)
+cdata.set('GDK_WINDOWING_BROADWAY', 1)
+gdkconfig = configure_file(input : 'gdkconfig.h.meson',
output : 'gdkconfig.h',
- configuration : configuration_data())
+ configuration : cdata
+)
xinc = include_directories('x11')
+wlinc = include_directories('wayland')
+
+libgdk_dep = declare_dependency(
+ sources: ['gdk.h'],
+ include_directories: [confinc, xinc, wlinc],
+ dependencies: [
+ mlib,
+ shmlib,
+ xrender_dep,
+ xi_dep,
+ xext_dep,
+ x11_dep,
+ fontconfig_dep,
+ epoxy_dep,
+ giounix_dep,
+ glib_dep,
+ pangocairo_dep,
+ cairogobj_dep,
+ pango_dep,
+ cairo_dep,
+ pixbuf_dep,
+ xkbdep,
+ wlclientdep,
+ wlprotocolsdep,
+ wlcursordep,
+ wlegldep
+ ]
+)
libgdk = shared_library('gdk',
+ gdkconfig,
gdk_sources, deprecated_gdk_sources,
gdkenum_c, gdkenum_h,
- gdkmarshal_h, gdkmarshal_c,
- gdk_x_sources,
- c_args: ['-DHAVE_CONFIG_H', '-DGDK_COMPILATION', '-DGDK_WINDOWING_X11'],
- include_directories: [confinc, xinc],
+ gdkmarshal_h, gdkmarshal_c, gdkresources,
+ gdk_x_sources, gdk_x_private_sources,
+ gdk_wayland_sources, gdk_wayland_private_sources,
+ gdk_broadway_sources, gdk_broadway_private_sources,
+ c_args: ['-DHAVE_CONFIG_H', '-DGDK_COMPILATION'],
+ include_directories: [confinc, xinc, wlinc],
dependencies: [
mlib,
+ shmlib,
xrender_dep,
xi_dep,
xext_dep,
cairogobj_dep,
pango_dep,
cairo_dep,
- pixbuf_dep
- ])
+ pixbuf_dep,
+ xkbdep,
+ wlclientdep,
+ wlprotocolsdep,
+ wlcursordep,
+ wlegldep
+ ]
+)
-# '$(a11y_c_sources)\
-# '$(deprecated_c_sources)\
-# '$(inspector_c_sources)\
-
subdir('deprecated')
subdir('a11y')
subdir('inspector')
'gtkbox.c',
'gtkbuildable.c',
'gtkbuilder.c',
+ 'gtkicon.c',
+ 'gtkshortcutswindow.c',
+ 'gtkshortcutssection.c',
'gtkbuilderparser.c',
'gtkbuilder-menus.c',
'gtkbutton.c',
'gtkcairoblur.c',
+ 'gtkcssnode.c',
+ 'gtkcsscalcvalue.c',
'gtkcalendar.c',
'gtkcellarea.c',
'gtkcellareabox.c',
'gtkcomboboxtext.c',
'gtkcontainer.c',
'gtkcssanimation.c',
+ 'gtkcssgadget.c',
+ 'gtkcsscustomgadget.c',
+ 'gtkboxgadget.c',
+ 'gtkimagedefinition.c',
+ 'gtkprogresstracker.c',
+ 'gtkcssimageradial.c',
+ 'gtkcssimagerecolor.c',
+ 'gtkcssimagefallback.c',
+ 'gtkbuiltinicon.c',
+ 'gtkcssstylechange.c',
+ 'gtkcsspalettevalue.c',
'gtkcssanimatedstyle.c',
'gtkcssarrayvalue.c',
'gtkcssbgsizevalue.c',
'gtkcssshadowsvalue.c',
'gtkcssshadowvalue.c',
'gtkcssshorthandproperty.c',
+ 'gtkshortcutlabel.c',
+ 'gtkfilechoosernativeportal.c',
+ 'gtkdragsource.c',
'gtkcssshorthandpropertyimpl.c',
'gtkcssstaticstyle.c',
'gtkcssstylefuncs.c',
'gtkcsstypes.c',
'gtkcssvalue.c',
'gtkcsswidgetnode.c',
+ 'gtkcssnodestylecache.c',
+ 'gtkapplicationaccels.c',
+ 'gtkcssdimensionvalue.c',
+ 'gtkshortcutsgroup.c',
+ 'gtkshortcutsshortcut.c',
+ 'gtkfilechoosernative.c',
+ 'gtknativedialog.c',
'gtkdialog.c',
'gtkdrawingarea.c',
+ 'gtkutils.c',
+ 'gtktooltipwindow.c',
'gtkeditable.c',
'gtkentry.c',
'gtkentrybuffer.c',
'gtkfontbutton.c',
'gtkfontchooser.c',
'gtkfontchooserdialog.c',
+ 'gtkcsswin32sizevalue.c',
'gtkfontchooserutils.c',
+ 'gtkwin32theme.c',
+ 'gtkwin32draw.c',
+ 'gtkcomposetable.c',
+ 'gdkpixbufutils.c',
'gtkfontchooserwidget.c',
'gtkframe.c',
+ 'gtkprintoperation-portal.c',
'gtkgladecatalog.c',
'gtkgesture.c',
'gtkgesturedrag.c',
'gtkglarea.c',
'gtkgrid.c',
'gtkheaderbar.c',
+ 'gtkdragdest.c',
'gtkhsla.c',
'gtkiconcache.c',
'gtkiconcachevalidator.c',
'gtkwidgetpath.c',
'gtkwindow.c',
'gtkwindowgroup.c',
- 'gtkwin32theme.c'
+ 'gtkwin32theme.c',
+ 'fallback-c89.c'
]
gtk_unix_sources = [
'gtkmountoperation-x11.c',
]
+gtk_wayland_sources = [
+ 'gtkapplication-wayland.c'
+]
dnd_sources = [
'gtkclipboard.c',
interface_prefix: 'org.Gtk.',
namespace: '_Gtk')
+libgtk_dep = declare_dependency(
+ link_with: libgdk,
+ sources: [
+ 'gtk.h'
+ ],
+ dependencies: [
+ gmodule_dep,
+ giounix_dep,
+ glib_dep,
+ atkbridge_dep,
+ pangocairo_dep,
+ pangoft_dep,
+ pango_dep,
+ cairogobj_dep,
+ cairo_dep,
+ fontconfig_dep,
+ pixbuf_dep,
+ atk_dep,
+ epoxy_dep,
+ mlib,
+ xi_dep,
+ x11_dep,
+ libgdk_dep
+ ],
+ include_directories: confinc
+)
+
+
libgtk = shared_library('gtk',
gtk_sources, gtk_dbus_src, gtk_unix_sources,
gtk_deprecated_c_sources, dnd_sources,
inspector_sources, a11y_sources,
- gtk_x11_sources,
+ gtk_x11_sources, gtk_wayland_sources,
gtk_use_wayland_or_x11_c_sources,
c_args: [
'-DGTK_COMPILATION', '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
'-DGTK_LIBDIR="libdir"', '-DGTK_SYSCONFDIR="sysconfdir"',
'-DGTK_LOCALEDIR="localedir"', '-DGTK_DATA_PREFIX="dataprefix"',
'-DGTK_PRINT_BACKENDS="null"', '-DGTK_VERSION="3"',
- '-DGDK_WINDOWING_X11'
+ '-DX11_DATA_PREFIX="/share/x11/locale"'
],
include_directories: [ confinc, gdkinc ],
dependencies: [
epoxy_dep,
mlib,
xi_dep,
- x11_dep
+ x11_dep,
+ libgdk_dep
],
- link_with : libgdk)
+ link_with: libgdk
+)
],
license: 'LGPLv2.1+')
+gnome = import('gnome')
+
+add_global_arguments('-DG_LOG_USE_STRUCTURED=1', language: 'c')
+
gtk_version = meson.project_version().split('.')
gtk_major_version = gtk_version[0]
gtk_minor_version = gtk_version[1]
gtk_micro_version = gtk_version[2]
gtk_binary_age = 100 * gtk_minor_version.to_int() + gtk_micro_version.to_int()
-gtk_api_version = '@0@'.0'.format(gtk_major_version)
+gtk_api_version = '@0@.0'.format(gtk_major_version)
cc = meson.get_compiler('c')
cdata = configuration_data()
+cdata.set('PACKAGE_VERSION', '"'+meson.project_version()+'"')
check_headers = [
['HAVE_CRT_EXTERNS_H', 'crt/externs.h'],
['HAVE_DLFCN_H', 'dlfcn.h'],
['HAVE_SYS_TIME_H', 'sys/time.h'],
['HAVE_SYS_TYPES_H', 'sys/types.h'],
['HAVE_UNISTD_H', 'unistd.h'],
+ ['HAVE_LINUX_MEMFD_H', 'linux/memfd.h']
]
foreach h : check_headers
# check token HAVE_RANDR15
['HAVE_ROUND', 'round', '#include<math.h>'],
['HAVE_RINT', 'rint', '#include<math.h>'],
+ ['HAVE_LOG2', 'log2', '#include<math.h>'],
+ ['HAVE_EXP2', 'exp2', '#include<math.h>'],
# check token HAVE_SINCOS
# check token HAVE_SOCKADDR_UN_SUN_LEN
# check token HAVE_SOLARIS_XINERAMA
atkbridge_dep = dependency('atk-bridge-2.0')
gmodule_dep = dependency('gmodule-2.0')
mlib = cc.find_library('m')
+shmlib = cc.find_library('rt')
fontconfig_dep = dependency('fontconfig')
+xkbdep = dependency('xkbcommon')
+wlclientdep = dependency('wayland-client')
+wlprotocolsdep = dependency('wayland-protocols')
+wlcursordep = dependency('wayland-cursor')
+wlegldep = dependency('wayland-egl')
if giounix_dep.found()
cdata.set('HAVE_GIO_UNIX', 1)
configure_file(input: 'config.h.meson', output: 'config.h', configuration: cdata)
-gnome = import('gnome')
-
subdir('gdk')
subdir('gtk')
-subdir('examples')
+subdir('demos')